texthandle: Ensure handles are invalidated on mode changes
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Oct 2015 15:27:53 +0000 (17:27 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Oct 2015 16:44:34 +0000 (18:44 +0200)
Otherwise the "cursor" handle stays with "cursor" appearance instead of
"selection end" when a text selection is started.

gtk/gtktexthandle.c

index ebc5c88fc151d215607cf363a3762fa0d5dbbabb..f4650e157d4081489732af3032da8c9ffe429f1f 100644 (file)
@@ -772,6 +772,11 @@ _gtk_text_handle_set_mode (GtkTextHandle     *handle,
 
   _gtk_text_handle_update (handle, GTK_TEXT_HANDLE_POSITION_SELECTION_START);
   _gtk_text_handle_update (handle, GTK_TEXT_HANDLE_POSITION_SELECTION_END);
+
+  if (start->widget && start->mode_visible)
+    gtk_widget_queue_draw (start->widget);
+  if (end->widget && end->mode_visible)
+    gtk_widget_queue_draw (end->widget);
 }
 
 GtkTextHandleMode